﻿﻿<%@ page language="java" pageEncoding="utf-8" %>
<%@ page import="org.whuims.pois.hibernate.BaseDao" %>
<%@ page import="org.whuims.pois.model.TopicC" %>
<%@ page import="java.util.List" %>
<!-- 头部区域：导航，搜索 -->
<%
    BaseDao baseDao = new BaseDao();
    long topicId1 = (Long)request.getSession().getAttribute("topicId");
    List list = baseDao.find("from TopicC where id='"+topicId1+"'");
    TopicC topicC = (TopicC)list.get(0);
    String topicString = topicC.getName();
%>
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
    <div class="navbar-header">
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
        </button>
        <a class="navbar-brand" href="mainPageAction.do?method=mainpage"><strong>${sessionScope.topicName} - 舆情信息系统</strong></a>
    </div>
    <div class="collapse navbar-collapse">
        <div class="container">
            <ul class=" nav navbar-nav">
                <li><a href="mainPageAction.do?method=mainpage"><span
                        class="glyphicon glyphicon-home"></span>&nbsp;首页</a></li>
                <li><a href="newsAction.do?method=newest&type=news"><span class="glyphicon glyphicon-globe"></span>&nbsp;最新新闻</a>
                </li>
                <li><a href="clusterAction.do?method=today"><span class="glyphicon glyphicon-tint"></span>&nbsp;今日要点</a>
                </li>
                <li><a><span class="glyphicon glyphicon-envelope"></span>&nbsp;联系我们</a></li>

            </ul>
            <form class="navbar-form navbar-left" role="search" method="post"
                  action="searchAction.do?method=search&st=0&from=top">
                <div class="form-group">
                    <input type="text" name="keyword" class="form-control" placeholder="Search" value="">
                </div>

                <div class="btn-group">
                    <button type="submit" class="btn btn-default ">搜索</button>
                    <button type="button" class="btn btn-primary " data-toggle="modal" data-target="#myModal">
                        高级搜索
                    </button>
                </div>


            </form>

            <ul class="nav navbar-nav navbar-right">
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                        <button type="button" class="btn btn-default btn-xs"> <span
                                class="glyphicon glyphicon-user"></span>&nbsp;${sessionScope.userName}</button>

                        <span class="caret"></span>

                    </a>
                    <ul class="dropdown-menu">
                        <li><a href="logoutAction.do">注销</a></li>
                        <li><a href="#">切换账户</a></li>
                    </ul>
                </li>
            </ul>
        </div>
    </div>
</div>


<div class="modal fade" id="myModal">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h5 class="modal-title"><strong class="text-primary">高级搜索</strong></h5>
            </div>
            <div class="modal-body">


                <form method="post" action="searchAction.do?method=search&st=1&from=top" class="form-horizontal" role="form">
                    <div class="form-group">
                        <label class="text-info col-sm-3 control-label" for="ontoName">站点名称：</label>

                        <div class=" col-sm-9">
                            <input type="text" required="required" placeholder="站点名称" id="ontoName" name="site"
                                   class="form-control">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="text-info col-sm-3 control-label" for="ontoDescription">关键词：</label>

                        <div class=" col-sm-9">
                            <input placeholder="请输入关键词，字数最好不好超过20字！" id="ontoDescription" name="title"
                                   class="form-control" type="text">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="text-info col-sm-3 control-label" for="ontoName">数据类型：</label>

                        <div class=" col-sm-6">
                            <select class="form-control" name="type">
                                <option value="all">all</option>
                                <option value="news">news</option>
                                <option value="bbs">bbs</option>
                                <option value="blog">blog</option>
                                <option value="weibo">weibo</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="text-info col-sm-3 control-label" for="ontoName">主题：</label>

                        <div class=" col-sm-6">
                            <select class="form-control" name="topic">
                                <option value=<%=topicId1%>><%=topicString%></option>
                                <option value=0>全部主题</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-offset-3 col-sm-6">
                            <button class="btn btn-default" type="submit">搜索</button>
                            <button type="reset" class="btn btn-default pull-right" value="reset">重置</button>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>

            </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div>
<!-- /.modal -->


